<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Spell Check Task</title>

</head>

<body>

<h2><a name="spell">Spell Check</a></h2>
<h3>Description</h3>
<p>Spell Check checks the spelling of all files in a directory. Code is broken into single words and compared to a dictionary.
If the words are not in the dictionary they are written to a file.</p>
<p>A project dictionary file can be specified that contains
valid words not present in the default dictionary.</p>
<p><a href="../CoreTypes/fileset.html">FileSet</a>s are used to select a
set of files to check.




<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
  <tr>
    <td valign="top"><b>Attribute</b></td>
    <td valign="top"><b>Description</b></td>
    <td align="center" valign="top"><b>Required</b></td>
  </tr>

  <tr>
    <td valign="top">baseDir</td>
    <td valign="top">Directory to check. All files in this directory and sub directories will be checked, unless filtered out.</td>
    <td valign="top" align="center">Yes, unless a nested
    <code>&lt;fileset&gt;</code> element is used, or if buildDictionary is true</td>
  </tr>
  <tr>
    <td valign="top">outputFile</td>
    <td valign="top">File to write spelling mistakes</td>
    <td valign="top" align="center">yes unless buildDictionary is true</td>
  </tr>
   <tr>
    <td valign="top">dictionary</td>
    <td valign="top">Project dictionary file. </td>
    <td valign="top" align="center">no</td>
  </tr>
   <tr>
    <td valign="top">min</td>
    <td valign="top">Minimum word size to check. All words smaller are not checked</td>
    <td valign="top" align="center">no defaults to 3</td>
  </tr>
   <tr>
    <td valign="top">max</td>
    <td valign="top">Maximum word size to check. All words larger are not checked</td>
    <td valign="top" align="center">no defaults to 80</td>
  </tr>
   <tr>
    <td valign="top">buildDictionary</td>
    <td valign="top">Used to help create a project dictionary. Output file will only contain the words not found. </td>
    <td valign="top" align="center">no defaults false</td>
  </tr>
   <tr>
    <td valign="top">allowed</td>
    <td valign="top">When buildProjectFile is true sets filters out commonly used words not found in the dictionary.
    For example if the word javax if found 5 times, but is not in the dictionary
    it would be written to the dictionary, however if it was found 4 times it would be.</td>
    <td valign="top" align="center">no defaults to 4</td>
  </tr>
</table>
<h3>Parameters specified as nested elements</h3>

<h4>fileset</h4>
 <p><a href="../CoreTypes/fileset.html">FileSet</a>s are used to select
sets of files to copy.
 To use a fileset, the <code>todir</code> attribute must be set.</p>


<h3>Examples</h3>
<p><b>Spell Check</b></p>

<pre>
    &lt;taskdef name="spellcheck" classname="com.robmayhew.jsc.ant.SpellTask"/&gt;

    &lt;target name="spellcheck" description="Spell Check App"&gt;
        &lt;spellcheck baseDir="app/src/com/robmayhew/jsc" outputFile="spellingErrors.txt"
        includes="**/*.java" dictionary="project.dic"/&gt;
    &lt;/target&gt;
</pre>
<p><b>Create a dictionary</b></p>
<pre>
    &lt;target name="createDictionary" description="Create Spell Check Dictionary"&gt;
        &lt;spellcheck baseDir="app/src/com/robmayhew/jsc" dictionary="project.dic" buildDictionary="true"&gt;
            &lt;include name="**/*.java"/&gt;
            &lt;include name="**/*.html"/&gt;
        &lt;/spellcheck&gt;
    &lt;/target&gt;
</pre>
<h3>Author</h3>
<a href="http://www.robmayhew.com">Rob Mayhew</a>
<h3>Download</h3>
Ant Spell <a href="http://www.robmayhew.com/antspell/antspellv1.zip">Version 1</a>
</body>
</html>

